<template>
	<view class="container">
		<!-- <image src="/static/more.png" mode="" class="more"></image> -->

		<view class="header">
			<view class="search">
				<u-icon name="search" color="#5f6064" size="20"></u-icon>
				<view style="margin-left: 15rpx;">请输入标题搜索</view>
			</view>
			<view class="select">
				<view>
					<view>审批状态</view>
					<u-icon name="arrow-down-fill" color="#999999" size="8"></u-icon>
				</view>
				<view>
					<view>申请类型</view>
					<u-icon name="arrow-down-fill" color="#999999" size="8"></u-icon>
				</view>
				<view>
					<view>提交日期</view>
					<u-icon name="arrow-down-fill" color="#999999" size="8"></u-icon>
				</view>
			</view>
		</view>

		<view class="list">
			<view class="list_item" v-for="item in timeList">
				<view class="item_title">
					<view class="status">
						已通过
					</view>
					<view class="item_name">
						{{name}}的加班申请
					</view>
					<view class="item_time" :contenteditable="true">
						{{item.passTime}} 00:22
					</view>
				</view>

				<view class="item_label">
					<view>签到时间</view>
					<view>{{item.startTime}}</view>
				</view>

				<view class="item_label">
					<view>签到地点</view>
					<view :contenteditable="true">国家电网实验验证中心(江北)</view>
				</view>

				<view class="item_label">
					<view>签到时间</view>
					<view>{{item.endTime}}</view>
				</view>

				<view class="item_label">
					<view>签到地点</view>
					<view :contenteditable="true">国家电网实验验证中心(江北)</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import dayjs from "dayjs"
	export default {
		data() {
			return {
				name: "",
				timeList: []
			}
		},
		methods: {

		},
		onLoad(par) {
			let params = JSON.parse(par.params);
			this.name = params.name;
			params.time.forEach(e => {
				e.passTime = dayjs(e.startTime).add(1, 'day').format('YYYY-MM-DD')
			})
			this.timeList = params.time;


	
			
			
			 // uni.setNavigationBarTitle({
			 //            title: '动态设置的标题'
			 //        });
		}
	}
</script>

<style>
	.item_label {
		margin-top: 16rpx;
		font-size: 28rpx;
		display: flex;
		align-items: center;

		>view:nth-child(1) {
			color: #979797;
		}

		>view:nth-child(2) {
			flex: 1;
			margin-left: 25rpx;
		}
	}

	.item_time {
		color: #979797;
		font-size: 26rpx;
	}

	.item_name {
		font-size: 30rpx;
		color: #343434;
		flex: 1;
		margin-left: 25rpx;
	}

	.status {
		font-size: 10px;
		color: #18a026;
		background: #edf7e6;
		padding: 8rpx 12rpx;
		border-radius: 3px;
		font-weight: bold;
	}

	.item_title {
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

	.list_item {
		background: #fff;
		border-radius: 20rpx;
		padding: 30rpx 30rpx;
		margin-bottom: 20rpx;
	}

	.list {
		flex: 1;
		overflow-y: auto;
		background: #f3f2f8;
		padding: 20rpx;

	}

	page {
		height: 100%;
	}

	.container {
		display: flex;
		flex-direction: column;
		height: 100%;
	}

	/* 	.more {
		position: fixed;
		z-index: 9999;
		width: 32px;
		height: 34px;
		top: -100rpx;
		right: 9px;
	} */

	.header {
		padding: 20rpx;

		.search {
			background: #f6f7fb;
			padding: 15rpx 15rpx;
			border-radius: 15rpx;
			display: flex;
			align-items: center;
			color: #919296;
			font-size: 28rpx;
		}
	}

	.select {
		margin-top: 30rpx;
		color: #666;
		font-size: 30rpx;
		display: flex;
		align-items: center;
		justify-content: space-around;

		>view {
			display: flex;

			>view:nth-child(1) {
				margin-right: 10rpx;
			}
		}
	}
</style>